const checkRequest = require("../utils/arg-handler");

const userRequest = async (ctx, next) => {
	// 校验规则
	const rules = [
		{ field: "name", type: "string" },
		{ field: "password", type: "string" }
	];

	const isErr = await checkRequest(ctx, rules);
	!isErr && (await next());
};

module.exports = userRequest;
